home *** CD-ROM | disk | FTP | other *** search
- var
- libuuidHandle: Pointer;
- uuid_generate_time: procedure (out Guid: TGUID) cdecl;
- function CreateGUID (out Guid: TGUID): HResult;
- const
- E_NOTIMPL = HRESULT($80004001);
- begin
- Result := E_NOTIMPL;
- if libuuidHandle = nil then begin
- libuuidHandle := dlopen ('libuuid.so.1', RTLD_LAZY);
- if libuuidHandle = nil then Exit;
- uuid_generate_time := dlsym (libuuidHandle, 'uuid_generate_time');
- if @uuid_generate_time = nil then Exit;
- end;
- uuid_generate_time (Guid);
- Result := 0;
- end;
-